<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Sergey
 * Date: 15.07.13
 * Time: 12:12
 * To change this template use File | Settings | File Templates.
 */

AddEventHandler("main", "OnAdminTabControlBegin", Array("SolutionEditPageHandler", "OnAdminTabControlBegin"));

class SolutionEditPageHandler
{
    function OnAdminTabControlBegin(&$form)
    {
        if (strpos($GLOBALS["APPLICATION"]->GetCurPage(), "bitrix/admin/iblock_element_edit.php") !== false) {

            // jquery
            echo '<link rel="stylesheet" type="text/css" href="/bitrix/modules/ss_constructor/admin/jquery_ui/css/smoothness/jquery-ui-1.10.3.custom.css" />';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jquery_ui/js/jquery-1.9.1.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jquery_ui/js/jquery-ui-1.10.3.custom.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jquery_ui/js/jquery-ui-1.10.3.custom.min.js"></script>';

            // jquery image area select lib
            echo '<link rel="stylesheet" type="text/css" href="/bitrix/modules/ss_constructor/admin/jquery_ias/css/imgareaselect-default.css" />';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jquery_ias/js/jquery.imgareaselect.pack.js"></script>';

            // jqwidgets
            echo '<link rel="stylesheet" type="text/css" href="/bitrix/modules/ss_constructor/admin/jqwidgets/styles/jqx.base.css" />';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jqwidgets/jqxcore.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jqwidgets/jqxbuttons.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jqwidgets/jqxscrollbar.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jqwidgets/jqxlistbox.js"></script>';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/jqwidgets/jqxdata.js"></script>';

            // json
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/json2.js"></script>';

            echo '<link rel="stylesheet" type="text/css" href="/bitrix/modules/ss_constructor/admin/solution-scheme-style.css" />';
            echo '<script type="text/javascript" src="/bitrix/modules/ss_constructor/admin/admin-solution-scheme.js"></script>';
        }
    }
}